package com.ihrm.common.entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class PageResult<T> {
    private Long total; // 总条数
    private Integer totalPage; // 总页数
    private List<T> items; // 当前页数据

    public PageResult(List<T> items, Long total) {
        this.items = items;
        this.total = total;
    }

    public PageResult(List<T> items, Long total, Integer totalPage) {
        this.items = items;
        this.total = total;
        this.totalPage = totalPage;
    }
}
